<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateDrawsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('draws', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->smallInteger('media_id');
            $table->integer('position_id');
            $table->integer('activity_id');
            $table->integer('adverti_id');
            $table->string('day', 10);
            $table->string('ip', 15);
            $table->string('cookie', 64);
            $table->enum('status', ['1', '2'])->default('2');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('draws');
    }
}
